<?php
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Traits\HasUuid;

class ExamTopicModel extends Model
{
    use HasFactory, HasUuid, SoftDeletes;

    protected $table = 'exam_topics';

    protected $hidden = ["deleted_at"];

    protected $fillable = [];

    public function options(): HasMany
    {
        return $this->hasMany(ExamTopicOptionModel::class, 'topic_id', 'id');
    }

    public function subject(): BelongsTo
    {
        return $this->belongsTo(ExamSubjectModel::class, 'subject_id', 'id');
    }
}
